From: Richard M. Stallman Date: Sat, 31 May 1997 02:47:47 +0000 (+0000) Subject: (custom-load-symbol): Simplify previous change. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~81014 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=85b78d5b5ae442643bf4ae1fe09e83498f4826e8;p=emacs.git (custom-load-symbol): Simplify previous change. --- diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 25843805497..e15a39a015c 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1306,10 +1306,15 @@ Change the state of this item." (condition-case nil (require load) (error nil))) - ((assoc load load-history)) + ;; Don't reload a file already loaded. + ((assoc (locate-library load) load-history)) (t (condition-case nil - (load-library load) + ;; Without this, we would load cus-edit recursively. + ;; We are still loading it when we call this, + ;; and it is not in load-history yet. + (or (equal load "cus-edit") + (load-library load)) (error nil)))))))) (defun custom-load-widget (widget)